package com.dmai.capacity.platform.user.pojo.request;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 机构表
 *
 * @author
 * @email
 * @date 2024-05-22 13:36:20
 */

@Data
public class InstitutionRegisterAgainRequest implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;

    @NotEmpty(message = "机构名不能为空")
    @Length(min = 1, max = 128, message = "机构名长度超过限制")
    private String name;

    @NotEmpty(message = "统一社会信用代码不能为空")
    @Length(min = 18, max = 18, message = "统一社会信用代码非法")
    private String uscc;

    @NotEmpty(message = "法人姓名不能为空")
    @Length(min = 1, max = 32, message = "法人姓名长度超过限制")
    private String legalPerson;

    @NotEmpty(message = "法人联系电话不能为空")
    @Length(min = 1, max = 32, message = "法人联系电话长度超过限制")
//    @Pattern(regexp = "^[0-9,+,\\-,_,（,）,(,)]{1,32}$", message = "法人联系电话只能填写数字")
//    @Pattern(regexp = "^1[0-9]{10}$", message = "法人联系电话非法")
    private String legalPersonMobile;

    @NotEmpty(message = "机构注册区划不能为空")
    private String orgRegArea;

    @NotEmpty(message = "机构注册详细地址不能为空")
    private String orgRegAddress;

    @NotEmpty(message = "机构办学区划不能为空")
    private String orgTeachingArea;

    @NotEmpty(message = "机构办学详细地址不能为空")
    private String orgTeachingAddress;

    @NotEmpty(message = "所属考区不能为空")
    private String examVenue;

    @NotEmpty(message = "联系人姓名不能为空")
    @Length(min = 1, max = 32, message = "联系人姓名长度超过限制")
    private String contactPerson;

    @NotEmpty(message = "联系人电话不能为空")
    @Length(min = 1, max = 32, message = "联系人电话长度超过限制")
//    @Pattern(regexp = "^[0-9,+,\\-,_,（,）,(,)]{1,32}$", message = "联系电话只能填写数字")
//    @Pattern(regexp = "^1[0-9]{10}$", message = "联系人联系电话非法")
    private String contactMobile;


    @NotEmpty(message = "联系人邮箱不能为空")
    @Email(regexp = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$", message = "联系人邮箱格式不正确")
    @Length(min = 1, max = 50, message = "联系人邮箱长度超过限制")
    private String contactEmail;


}
